import { createI18n } from "vue-i18n";
import zh from "./zh";
import en from "./en";
let lang = "zh";
try {
    const AppStore: any = JSON.parse(sessionStorage.getItem("AppStore") as any);
    if (AppStore?.system?.language) {
        lang = AppStore?.system?.language;
    }
} catch (error) {
    throw Error("获取SessionStorage失败!");
}
const i18n = createI18n({
    locale: lang,
    messages: {
        zh: {
            ...zh,
        },
        en: {
            ...en,
        },
    },
});
export { i18n };
